<?php
/**
 * 午餐
 * 2020年1月2日18:08:17
 */
namespace Application\Common\State\UseState;

class LunchState extends State
{
    protected $current = '午';
    protected $next_state = 'DinnerState';
    // 重写、获取就餐情况
    public function getRepastInfo($condition = null)
    {
        if($this -> current === $condition){
            echo "当前就餐情况：{$this -> current} 要吃得饱<br />";
            return true;
        }
        $next_state = (new $this -> next_state) -> getRepastInfo($condition);
        return false;
    }
}
